package feeinterface.utils;

import java.util.Properties;

import org.apache.log4j.Logger;

import com.ulwx.tool.EscapeUtil;
import com.ulwx.tool.Path;
import com.ulwx.tool.StringUtils;

public class URLConfig {

	private static Logger log = Logger.getLogger(URLConfig.class);

	/**
	 * 接口入口
	 */
	// public static final String ROOT =
	// "http://u6server2.gicp.net:5000/interface/dmusp/interface";
	public static String ROOT = "";
	public static String FileServer = "";
	static {
		try {
			Properties p = new Properties();
			p.load(Path.getResource("/url.properties"));
			String cfgRoot = p.getProperty("root");
			String cfgFileServer = p.getProperty("FileServer");
			if (!StringUtils.isEmpty(cfgRoot)) {
				ROOT = cfgRoot;
			}
			if (!StringUtils.isEmpty(cfgFileServer)) {
				FileServer = cfgFileServer;
			}
		} catch (Exception e) {
			log.error("", e);
			// e.printStackTrace();
		}
	}

	public static void main(String[] args) {

		// URLConfig.TOLLURL="ssss";
		System.out.println(ROOT);
		System.out.println(EscapeUtil.unescapeUrl("%E7%BB%BF%E9%9F%B5%E6%97%B6%E5%85%89", "utf-8"));
	}
}
